package W11082;

public class Bus extends Mang {
	public int seat;

	public Bus() {
	}

	public Bus(String card, String logo, double rent, int seat) {
		super(card, logo, rent);
		this.seat = seat;
	}

	public int getSeat() {
		return seat;
	}

	public void setSeat(int seat) {
		this.seat = seat;
	}

	public double calMoney(int day) {
		if (day > 150) {
			return this.getRent() * day * 0.7;
		}
		if (day >= 30) {
			return this.getRent() * day * 0.7;
		}
		if (day >= 7) {
			return this.getRent() * day * 0.8;
		}
		if (day >= 3) {
			return this.getRent() * day * 0.9;
		}
		return this.getRent() * day;
	}

}
